package wexin.web.test;
import org.apache.http.HttpRequest;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
 

@Controller
@EnableAutoConfiguration
public class SimpleController {
 
    @RequestMapping(value ="/hello", method = RequestMethod.GET)
   // @ResponseBody
    public String hello(Model model,HttpRequest  request){
    	model.addAttribute("userName", "xu") ;
        return "haha";
    }
    
    @RequestMapping(value ="/other", method = RequestMethod.GET)
     @ResponseBody
     public String other(){
         return "other";
     }
    
    @RequestMapping(value ="/index2", method = RequestMethod.GET)
    public String index(){
        return "index2";   
    }
 
    
}